#include <cstdio>

int MEM[10000000];
int MEM2[10000000];

int C(int n, int k) {
	if (n+1 == k && MEM[n] != 0) {
		return MEM[n];
	}
	if (n == k && MEM2[n] != 0) {
		return MEM2[n];
	}
	if (k==0 || k==n) return 1;
	else {
		int Ck_ns1 = C(n-1, k);
		if (n==k) MEM[n-1] = Ck_ns1;
		int Cks1_ns1 = C(n-1, k-1);
		if (n==k) MEM2[n-1] = Cks1_ns1;
		return Ck_ns1 + Cks1_ns1;
	}
}

int main() {
	int n, k;
	scanf("%d%d", &k, &n);
	int result = C(n, k);
	printf("%d", result);
	return 0;
}
